﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DBA.App.Dictionary
{
    public class Convert
    {
        public static long ToDecimal(String str)
        {
            long longValue = 0;
            String strBase64 = @"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
            int len = str.Length;
            for (int i = 0; i < len; i++)
            {
                int pos = strBase64.IndexOf(str.Substring(i, 1));
                Console.WriteLine(pos);
                longValue += (long)Math.Pow(64, len - 1 - i) * pos;
            }

            return longValue;

        }
    }
}
